using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class ICCreditInstantEntryMap : EntityTypeConfiguration<ICCreditInstantEntry>
    {
        public ICCreditInstantEntryMap()
        {
            // Primary Key
            this.HasKey(t => new { t.FInterID, t.FItemID, t.FEntryQtyPara0, t.FEntryAmtPara0 });

            // Properties
            this.Property(t => t.FInterID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FItemID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FEntryQtyPara0)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FEntryAmtPara0)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            // Table & Column Mappings
            this.ToTable("ICCreditInstantEntry");
            this.Property(t => t.FInterID).HasColumnName("FInterID");
            this.Property(t => t.FItemID).HasColumnName("FItemID");
            this.Property(t => t.FEntryQtyPara1).HasColumnName("FEntryQtyPara1");
            this.Property(t => t.FEntryQtyPara2).HasColumnName("FEntryQtyPara2");
            this.Property(t => t.FEntryQtyPara3).HasColumnName("FEntryQtyPara3");
            this.Property(t => t.FEntryAmtPara1).HasColumnName("FEntryAmtPara1");
            this.Property(t => t.FEntryAmtPara2).HasColumnName("FEntryAmtPara2");
            this.Property(t => t.FEntryAmtPara3).HasColumnName("FEntryAmtPara3");
            this.Property(t => t.FEntryQtyPara0).HasColumnName("FEntryQtyPara0");
            this.Property(t => t.FEntryAmtPara0).HasColumnName("FEntryAmtPara0");
        }
    }
}
